<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                >
    <f:view contentType="text/html">
        <h:form>
            <h:panelGrid columns="1" width="100%" >
                <p:panel style="width: 100%">
                    <f:facet name="header">
                        <h:outputText value="Material Kanban"/>
                    </f:facet>

                    <h:panelGrid columns="12">                    
                        <h:outputText value="Item Code :" style="font-weight: bold"></h:outputText>
                        <h:selectOneMenu>
                            <f:selectItem itemValue="A134"/>
                        </h:selectOneMenu>                                        
                        <p:spacer width="30"/>

                        <h:outputText value="Product Code :" style="font-weight: bold"></h:outputText>
                        <h:selectOneMenu>
                            <f:selectItem itemValue="E132"/>
                        </h:selectOneMenu>                                        
                        <p:spacer width="30"/>

                        <h:outputText value="Line :" style="font-weight: bold"></h:outputText>
                        <h:selectOneMenu>
                            <f:selectItem itemValue="Line A"/>
                        </h:selectOneMenu>                                        
                        <p:spacer width="30"/>

                        <h:outputText value="Quantity :" style="font-weight: bold"></h:outputText>
                        <h:inputText/>
                        <p:spacer width="30"/>

                        <h:outputText value="Kanban No :" style="font-weight: bold"></h:outputText>
                        <h:inputText/>
                        <p:spacer width="30"/>

                        <h:outputText value="Required By :" style="font-weight: bold"></h:outputText>
                        <h:inputText/>
                        <p:spacer width="30"/>
                    </h:panelGrid>
                    <p:separator />                
                    <h:panelGrid style="text-align: center;width: 100%" columns="2">
                        <p:panel style="border-style: none">
                            <p:button value="Add"/>
                            <p:spacer width="20"/>
                            <p:button value="Search"/>
                            <p:spacer width="20"/>
                            <p:button value="Clear"/>                          
                        </p:panel>                    
                        <p:panel style="text-align: left;border-style: none">
                            <p:fileUpload fileUploadListener="#{fileUploadController.handleFileUpload}"   
                                          allowTypes="*.jpg;*.png;*.gif;" description="Images"/>                                                                                                    
                        </p:panel>                   
                    </h:panelGrid>                                                    
                </p:panel>
            </h:panelGrid>


            <p:dataTable  var="mkDT" value="#{kanbanBean.materialKanbanList}" paginator="true" rows="10" id="materialKanban" 
                          selectionMode="single" paginatorPosition="bottom"
                          paginatorTemplate="{FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}{RowsPerPageDropdown}"  
                          rowsPerPageTemplate="5,10,15" style="font-size: 12px">
                <f:facet name="header">
                    View Material Kanban
                </f:facet>

                <p:column>
                    <f:facet name="header">
                        <h:outputText value="S.No" />
                    </f:facet>
                    <h:outputText value="#{mkDT.matlRequestNo}" />
                </p:column>

                <p:column>
                    <f:facet name="header">
                        <h:outputText value="Item Code" />
                    </f:facet>
                    <h:outputText value="#{mkDT.itemCode}" />
                </p:column>

                <p:column>
                    <f:facet name="header">
                        <h:outputText value="Item Name" />
                    </f:facet>
                    <h:outputText value="#{mkDT.itemName}" />
                </p:column>

                <p:column>
                    <f:facet name="header">
                        <h:outputText value="For Model" />
                    </f:facet>
                    <h:outputText value="#{mkDT.modelName}" />
                </p:column>


                <p:column>
                    <f:facet name="header">
                        <h:outputText value="Quantity" />
                    </f:facet>
                    <h:outputText value="#{mkDT.quantity}" />
                </p:column>


                <p:column>
                    <f:facet name="header">
                        <h:outputText value="Cell" />
                    </f:facet>
                    <h:outputText value="#{mkDT.cellName}" />
                </p:column>


                <p:column>
                    <f:facet name="header">
                        <h:outputText value="Kanban No" />
                    </f:facet>
                    <h:outputText value="#{mkDT.kanbanNo}" />
                </p:column>

                <p:column>
                    <f:facet name="header">
                        <h:outputText value="Required By" />
                    </f:facet>
                    <h:outputText value="#{mkDT.requiredTs}" />
                </p:column>

                <p:column>
                    <f:facet name="header">
                        <h:outputText value="Status" />
                    </f:facet>
                    <h:outputText value="#{mkDT.response}" />
                </p:column>


                <p:column selectionMode="multiple" headerText="Select"/>
            </p:dataTable>     

            <p:toolbar>
                <p:toolbarGroup align="right">  
                    <p:commandButton type="push" title="Print" image="ui-icon-file" value="Edit"/>               
                    <p:commandButton type="push" title="Delete" image="ui-icon-trash" value="Delete"/>           
                    <p:commandButton type="push" title="Submit" image="ui-icon-file" value="Submit"/>               
                </p:toolbarGroup>
            </p:toolbar>
            <!--    
            <h:panelGrid style="text-align: center;width: 100%" columns="2">
                <p:panel style="border-style: none">
                    <p:button value="Edit"/>
                    <p:spacer width="20"/>
                    <p:button value="Delete"/>                        
                </p:panel>
            </h:panelGrid>                                                                   
            -->
        </h:form>
    </f:view>
</ui:composition>